package com.sina.shop.controller.event;

import com.sina.shop.web.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * 段浩杰   2018-01-08-11:36
 */
@Controller
@RequestMapping("event")
public class EventController extends BaseController {

    @Autowired
    @Qualifier("eventService")
    private EventService eventService;

    @ResponseBody
    @RequestMapping("testEvent")
    public String testEvent() {
        eventService.testEvent();
        LOG.info("testEvent startTime:{} ", System.currentTimeMillis());
        return "ok";
    }

    @ResponseBody
    @RequestMapping("testAsyncEvent")
    public String testAsyncEvent() {
        eventService.testAsyncEvent();
        LOG.info("testEvent startTime:{} ", System.currentTimeMillis());
        return "ok";
    }
}
